<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="../../themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" />
    <script src="../../external/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="../../external/jquery-ui-1.9.1.custom.min.js" type="text/javascript"></script>
    <script src="../../external/raphael-min.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.wijmo.raphael.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.wijmo.wijgauge.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.wijmo.wijradialgauge.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#gauge").wijradialgauge({
                value: 100,
                max: 150,
                min: 0,
                startAngle: -45,
                sweepAngle: 270,
                islogarithmic: false,
                origin: {
                    x: 0.5, y: 0.5
                },
                labels: {
                    offset: -30, 
                    style: {
                        fill: "#556A7C",
                        stroke: "none"
                    }
                },
                tickMinor: {
                    position: "inside",
                    style: {
                        fill: "#556A7C",
                        stroke: "#556A7C"
                    },
                    interval: 2,
                    visible: true,
                    offset: 0
                },
                tickMajor: {
                    position: "center",
                    style: {
                        fill: "#556A7C",
                        stroke: "#556A7C"
                    },
                    interval: 10,
                    visible: true
                },
                face: {
                    style: {
                        fill: "#E0E8EF",
                        stroke: "#E0E8EF"
                    }
                },
                pointer: {
                    length: 1,
                    style: {
                        fill: "#BF551C",
                        stroke: "#BF551C"
                    }
                },
                cap: {
                    style: {
                        fill: "#7F9CAD",
                        stroke: "#7F9CAD"
                    }
                }
            });

            $("#btnExec").click(function () {
                $("#gauge").wijradialgauge("option", "marginLeft", parseInt($("#txLeft").val()));
                $("#gauge").wijradialgauge("option", "marginRight", parseInt($("#txRight").val()));
                $("#gauge").wijradialgauge("option", "marginTop", parseInt($("#txTop").val()));
                $("#gauge").wijradialgauge("option", "marginBottom", parseInt($("#txBottom").val()));
            })
        });
    
    </script>
</head>
<body class="demo-single">
    <div class="container">
        <div class="header">
            <h2>
                Margin</h2>
        </div>
        <div class="main demo">
            <!-- Begin demo markup -->
            <div id="gauge">
            </div>
            <!-- End demo markup -->
            <div class="demo-options">
                <!-- Begin options markup -->
                <div>
                    <p>
                        <label>
                            MarginLeft:</label>
                        <input type="text" id="txLeft" value="0" />
                    </p>
                    <p>
                        <label>
                            MarginRight:</label>
                        <input type="text" id="txRight" value="0" />
                    </p>
                    <p>
                        <label>
                            MarginTop:</label>
                        <input type="text" id="txTop" value="0" />
                    </p>
                    <p>
                        <label>
                            MarginBottom:</label>
                        <input type="text" id="txBottom" value="0" />
                    </p>
                    <p>
                        <input type="button" id="btnExec" value="Apply" />
                    </p>
                </div>
                <!-- End options markup -->
            </div>
        </div>
        <div class="footer demo-description">
            <p>
                This sample shows how to use the marginLeft, marginTop, marginRight and marginBottom options to set the gauge's margins.</p>
        </div>
    </div>
</body>
</html>
